package com.example.demo.Entity;

import java.time.LocalDate;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * @version: V0.3
 * @author: 郑皓杰 吴嘉鑫
 * @className: Experience
 * @packageName: com.example.demo.Entity
 * @description: 这是经历实体类
 * @data: 2021-07-14
 **/


@JsonIgnoreProperties({"hibernateLazyInitializer","handler"})//是因为查询到的对象是null值没有获取到，无法反序列化为json 返回到前台
@Entity
@Table(name="experience")
public class Experience {
	
	/**
	 * 经历ID
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer expid;
	
	/**
	 * 经历所属员工ID
	 */
	private Integer empid;
	
	/**
	 * 经历所在公司ID
	 */
	private Integer companyID;
	
	/**
	 * 经历所在公司名字
	 */
	private String companyname;
	
	/**
	 * 经历对应的描述ID
	 */
	private Integer descriptionid;
	
	/**
	 * 入职时间
	 */
	private LocalDate recruited;
	
	/**
	 * 离职时间
	 */
	private LocalDate suspended;
	
	/**
	 * 所属职位
	 */
	private String position;
	
	/**
	 * 年薪
	 */
	private Integer salary;

	
	public Integer getExpid() {
		return expid;
	}

	public void setExpid(Integer expid) {
		this.expid = expid;
	}

	public Integer getEmpid() {
		return empid;
	}

	public void setEmpid(Integer empid) {
		this.empid = empid;
	}

	public Integer getCompanyID() {
		return companyID;
	}

	public void setCompanyID(Integer companyID) {
		this.companyID = companyID;
	}

	public String getCompanyname() {
		return companyname;
	}

	public void setCompanyname(String companyname) {
		this.companyname = companyname;
	}

	public Integer getDescriptionid() {
		return descriptionid;
	}

	public void setDescriptionid(Integer descriptionid) {
		this.descriptionid = descriptionid;
	}

	public LocalDate getRecruited() {
		return recruited;
	}

	public void setRecruited(LocalDate recruited) {
		this.recruited = recruited;
	}

	public LocalDate getSuspended() {
		return suspended;
	}

	public void setSuspended(LocalDate suspended) {
		this.suspended = suspended;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public Integer getSalary() {
		return salary;
	}

	public void setSalary(Integer salary) {
		this.salary = salary;
	}


	@Override
	public String toString() {
		return "Experience [expid=" + expid + ", empid=" + empid + ", companyID=" + companyID + ", companyname="
				+ companyname + ", descriptionid=" + descriptionid + ", recruited=" + recruited + ", suspended="
				+ suspended + ", position=" + position + ", salary=" + salary + " ]";
	}	
}
